<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Surface Matching</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Surface Matching</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/d48/structhashnode__i.html">hashnode_i</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html">cv::ppf_match_3d::ICP</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class implements a very efficient and robust variant of the iterative closest point (<a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a>) algorithm. The task is to register a 3D model (or point cloud) against a set of noisy target data. The variants are put together by myself after certain tests. The task is to be able to match partial, noisy point clouds in cluttered scenes, quickly. You will find that my emphasis is on the performance, while retaining the accuracy. This implementation is based on Tolga Birdal's MATLAB implementation in here: <a href="http://www.mathworks.com/matlabcentral/fileexchange/47152-icp-registration-using-efficient-variants-and-multi-resolution-scheme">http://www.mathworks.com/matlabcentral/fileexchange/47152-icp-registration-using-efficient-variants-and-multi-resolution-scheme</a> The main contributions come from:  <a href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d22/classcv_1_1ppf__match__3d_1_1Pose3D.html">cv::ppf_match_3d::Pose3D</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class, allowing the storage of a pose. The data structure stores both the quaternions and the matrix forms. It supports IO functionality together with various helper methods to work with poses.  <a href="../../d5/d22/classcv_1_1ppf__match__3d_1_1Pose3D.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d4b/classcv_1_1ppf__match__3d_1_1PoseCluster3D.html">cv::ppf_match_3d::PoseCluster3D</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">When multiple poses (see <a class="el" href="../../d5/d22/classcv_1_1ppf__match__3d_1_1Pose3D.html" title="Class, allowing the storage of a pose. The data structure stores both the quaternions and the matrix ...">Pose3D</a>) are grouped together (contribute to the same transformation) pose clusters occur. This class is a general container for such groups of poses. It is possible to store, load and perform IO on these poses.  <a href="../../d2/d4b/classcv_1_1ppf__match__3d_1_1PoseCluster3D.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d25/classcv_1_1ppf__match__3d_1_1PPF3DDetector.html">cv::ppf_match_3d::PPF3DDetector</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Class, allowing the load and matching 3D models. Typical Use:  <a href="../../db/d25/classcv_1_1ppf__match__3d_1_1PPF3DDetector.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dff/structTHash.html">THash</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Struct, holding a node in the hashtable.  <a href="../../da/dff/structTHash.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga209242181c847535105212d7b01d4d82"><td align="right" class="memItemLeft" valign="top">typedef <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">cv::ppf_match_3d::KeyType</a></td></tr>
<tr class="separator:ga209242181c847535105212d7b01d4d82"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaace349a5dbee5aa24dd68d8f57518902"><td align="right" class="memItemLeft" valign="top">typedef <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d5/d22/classcv_1_1ppf__match__3d_1_1Pose3D.html">Pose3D</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaace349a5dbee5aa24dd68d8f57518902">cv::ppf_match_3d::Pose3DPtr</a></td></tr>
<tr class="separator:gaace349a5dbee5aa24dd68d8f57518902"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga89a4263e9791e1a3c81f4403cd0ad5a3"><td align="right" class="memItemLeft" valign="top">typedef <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d2/d4b/classcv_1_1ppf__match__3d_1_1PoseCluster3D.html">PoseCluster3D</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga89a4263e9791e1a3c81f4403cd0ad5a3">cv::ppf_match_3d::PoseCluster3DPtr</a></td></tr>
<tr class="separator:ga89a4263e9791e1a3c81f4403cd0ad5a3"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7ba92c6b7cb6cc7565c2c038ddc88bbb"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga7ba92c6b7cb6cc7565c2c038ddc88bbb">cv::ppf_match_3d::addNoisePC</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, double scale)</td></tr>
<tr class="separator:ga7ba92c6b7cb6cc7565c2c038ddc88bbb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaba913ce390921fb9cb212de4198665a2"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaba913ce390921fb9cb212de4198665a2">cv::ppf_match_3d::computeBboxStd</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, <a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp;xRange, <a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp;yRange, <a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp;zRange)</td></tr>
<tr class="separator:gaba913ce390921fb9cb212de4198665a2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa74e62c7b2a8b8a70e44e42211fd00f5"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaa74e62c7b2a8b8a70e44e42211fd00f5">cv::ppf_match_3d::computeNormalsPC3d</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;PC, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;PCNormals, const int NumNeighbors, const bool FlipViewpoint, const <a class="el" href="../../dc/d84/group__core__basic.html#gab9e0ab642a3e01742916763173b72232">Vec3f</a> &amp;viewpoint)</td></tr>
<tr class="memdesc:gaa74e62c7b2a8b8a70e44e42211fd00f5"><td class="mdescLeft"> </td><td class="mdescRight">Compute the normals of an arbitrary point cloud computeNormalsPC3d uses a plane fitting approach to smoothly compute local normals. Normals are obtained through the eigenvector of the covariance matrix, corresponding to the smallest eigen value. If PCNormals is provided to be an Nx6 matrix, then no new allocation is made, instead the existing memory is overwritten.  <a href="../../d9/d25/group__surface__matching.html#gaa74e62c7b2a8b8a70e44e42211fd00f5">More...</a><br/></td></tr>
<tr class="separator:gaa74e62c7b2a8b8a70e44e42211fd00f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga439450ce38dae0b87bf497c50d6211e9"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga439450ce38dae0b87bf497c50d6211e9">cv::ppf_match_3d::destroyFlann</a> (void *flannIndex)</td></tr>
<tr class="separator:ga439450ce38dae0b87bf497c50d6211e9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4ef8ad47fa5a52443c05cd0fafba11cc"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga4ef8ad47fa5a52443c05cd0fafba11cc">cv::ppf_match_3d::getRandomPose</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga366070cdc95233a6b6db521dfd99e713">Matx44d</a> &amp;Pose)</td></tr>
<tr class="separator:ga4ef8ad47fa5a52443c05cd0fafba11cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga90a4c50416db18acf94dbd1ea093f2f5"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga90a4c50416db18acf94dbd1ea093f2f5">cv::ppf_match_3d::hashtable_int_clone</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl)</td></tr>
<tr class="separator:ga90a4c50416db18acf94dbd1ea093f2f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga015840b9f9314f64af7ccd29d6a866d3"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga015840b9f9314f64af7ccd29d6a866d3">cv::ppf_match_3d::hashtableCreate</a> (size_t size, size_t(*hashfunc)(<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a>))</td></tr>
<tr class="separator:ga015840b9f9314f64af7ccd29d6a866d3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf6dab57e6f2f511e029e198946084034"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaf6dab57e6f2f511e029e198946084034">cv::ppf_match_3d::hashtableDestroy</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl)</td></tr>
<tr class="separator:gaf6dab57e6f2f511e029e198946084034"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad71d713e1d0473252d348a830c7d49b8"><td align="right" class="memItemLeft" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gad71d713e1d0473252d348a830c7d49b8">cv::ppf_match_3d::hashtableGet</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, <a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> key)</td></tr>
<tr class="separator:gad71d713e1d0473252d348a830c7d49b8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa6bde312719e4169913498e486b94563"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d7/d48/structhashnode__i.html">hashnode_i</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaa6bde312719e4169913498e486b94563">cv::ppf_match_3d::hashtableGetBucketHashed</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, <a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> key)</td></tr>
<tr class="separator:gaa6bde312719e4169913498e486b94563"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaec303fafd34abac1f8484e770873baab"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaec303fafd34abac1f8484e770873baab">cv::ppf_match_3d::hashtableInsert</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, <a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> key, void *data)</td></tr>
<tr class="separator:gaec303fafd34abac1f8484e770873baab"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae8d440f96050e4c9281cf31f44e3664c"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gae8d440f96050e4c9281cf31f44e3664c">cv::ppf_match_3d::hashtableInsertHashed</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, <a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> key, void *data)</td></tr>
<tr class="separator:gae8d440f96050e4c9281cf31f44e3664c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0a19bdd2a6084b1e36ffa5c08a8b6dbe"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga0a19bdd2a6084b1e36ffa5c08a8b6dbe">cv::ppf_match_3d::hashtablePrint</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl)</td></tr>
<tr class="separator:ga0a19bdd2a6084b1e36ffa5c08a8b6dbe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaaefc1e53458a2f84f73244b1450489d7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaaefc1e53458a2f84f73244b1450489d7">cv::ppf_match_3d::hashtableRead</a> (FILE *f)</td></tr>
<tr class="separator:gaaefc1e53458a2f84f73244b1450489d7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaebe839b16913e028b8eb8a9ff6288130"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaebe839b16913e028b8eb8a9ff6288130">cv::ppf_match_3d::hashtableRemove</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, <a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> key)</td></tr>
<tr class="separator:gaebe839b16913e028b8eb8a9ff6288130"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gacf7a8a048ffc1c1db34732c64c6a47b2"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gacf7a8a048ffc1c1db34732c64c6a47b2">cv::ppf_match_3d::hashtableResize</a> (<a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, size_t size)</td></tr>
<tr class="separator:gacf7a8a048ffc1c1db34732c64c6a47b2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7ee817b1612534a975e518877efbd956"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga7ee817b1612534a975e518877efbd956">cv::ppf_match_3d::hashtableWrite</a> (const <a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> *hashtbl, const size_t dataSize, FILE *f)</td></tr>
<tr class="separator:ga7ee817b1612534a975e518877efbd956"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadca01b67adab0bbbdd5b2507f63c7f21"><td align="right" class="memItemLeft" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gadca01b67adab0bbbdd5b2507f63c7f21">cv::ppf_match_3d::indexPCFlann</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>)</td></tr>
<tr class="separator:gadca01b67adab0bbbdd5b2507f63c7f21"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad893719cc47a72b24482f2bfdebb409e"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gad893719cc47a72b24482f2bfdebb409e">cv::ppf_match_3d::loadPLYSimple</a> (const char *fileName, int withNormals=0)</td></tr>
<tr class="memdesc:gad893719cc47a72b24482f2bfdebb409e"><td class="mdescLeft"> </td><td class="mdescRight">Load a PLY file.  <a href="../../d9/d25/group__surface__matching.html#gad893719cc47a72b24482f2bfdebb409e">More...</a><br/></td></tr>
<tr class="separator:gad893719cc47a72b24482f2bfdebb409e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga26d44267cee459ec1a861b24066e2d89"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga26d44267cee459ec1a861b24066e2d89">cv::ppf_match_3d::next_power_of_two</a> (<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a> value)</td></tr>
<tr class="memdesc:ga26d44267cee459ec1a861b24066e2d89"><td class="mdescLeft"> </td><td class="mdescRight">Round up to the next highest power of 2.  <a href="../../d9/d25/group__surface__matching.html#ga26d44267cee459ec1a861b24066e2d89">More...</a><br/></td></tr>
<tr class="separator:ga26d44267cee459ec1a861b24066e2d89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaae4792bf8469222356c16364759941aa"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gaae4792bf8469222356c16364759941aa">cv::ppf_match_3d::normalizePCCoeff</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, float scale, float *Cx, float *Cy, float *Cz, float *MinVal, float *MaxVal)</td></tr>
<tr class="separator:gaae4792bf8469222356c16364759941aa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1f97667a487faab9bd849341361db1a1"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga1f97667a487faab9bd849341361db1a1">cv::ppf_match_3d::queryPCFlann</a> (void *flannIndex, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;<a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;indices, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;distances)</td></tr>
<tr class="separator:ga1f97667a487faab9bd849341361db1a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac98a74b02d163b63ec68e8bf6ebcf8c6"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gac98a74b02d163b63ec68e8bf6ebcf8c6">cv::ppf_match_3d::queryPCFlann</a> (void *flannIndex, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;<a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;indices, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;distances, const int numNeighbors)</td></tr>
<tr class="separator:gac98a74b02d163b63ec68e8bf6ebcf8c6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga685d0fc50635dfdd4ebc587067ff44a9"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga685d0fc50635dfdd4ebc587067ff44a9">cv::ppf_match_3d::samplePCByQuantization</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, <a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp;xrange, <a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp;yrange, <a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp;zrange, float sample_step_relative, int weightByCenter=0)</td></tr>
<tr class="separator:ga685d0fc50635dfdd4ebc587067ff44a9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gafa74163329034224819de46933541e9c"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gafa74163329034224819de46933541e9c">cv::ppf_match_3d::samplePCUniform</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> PC, int sampleStep)</td></tr>
<tr class="separator:gafa74163329034224819de46933541e9c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5d137ea853b0263108fc324cff4656f3"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga5d137ea853b0263108fc324cff4656f3">cv::ppf_match_3d::samplePCUniformInd</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> PC, int sampleStep, std::vector&lt; int &gt; &amp;indices)</td></tr>
<tr class="separator:ga5d137ea853b0263108fc324cff4656f3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab21c92ff881ae85b72c552e7e6e52c55"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gab21c92ff881ae85b72c552e7e6e52c55">cv::ppf_match_3d::transformPCPose</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, const <a class="el" href="../../dc/d84/group__core__basic.html#ga366070cdc95233a6b6db521dfd99e713">Matx44d</a> &amp;Pose)</td></tr>
<tr class="separator:gab21c92ff881ae85b72c552e7e6e52c55"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab6d5a91876b73a024830da8405909b79"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#gab6d5a91876b73a024830da8405909b79">cv::ppf_match_3d::transPCCoeff</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> <a class="el" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, float scale, float Cx, float Cy, float Cz, float MinVal, float MaxVal)</td></tr>
<tr class="separator:gab6d5a91876b73a024830da8405909b79"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga72ffa4c73f214a573cb4028e015c4adb"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga72ffa4c73f214a573cb4028e015c4adb">cv::ppf_match_3d::writePLY</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> PC, const char *fileName)</td></tr>
<tr class="memdesc:ga72ffa4c73f214a573cb4028e015c4adb"><td class="mdescLeft"> </td><td class="mdescRight">Write a point cloud to PLY file.  <a href="../../d9/d25/group__surface__matching.html#ga72ffa4c73f214a573cb4028e015c4adb">More...</a><br/></td></tr>
<tr class="separator:ga72ffa4c73f214a573cb4028e015c4adb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga965333522cfe06814478dec8ffa4cd41"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d25/group__surface__matching.html#ga965333522cfe06814478dec8ffa4cd41">cv::ppf_match_3d::writePLYVisibleNormals</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> PC, const char *fileName)</td></tr>
<tr class="memdesc:ga965333522cfe06814478dec8ffa4cd41"><td class="mdescLeft"> </td><td class="mdescRight">Used for debbuging pruposes, writes a point cloud to a PLY file with the tip of the normal vectors as visible red points.  <a href="../../d9/d25/group__surface__matching.html#ga965333522cfe06814478dec8ffa4cd41">More...</a><br/></td></tr>
<tr class="separator:ga965333522cfe06814478dec8ffa4cd41"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2>Note about the License and Patents </h2>
<p>The following patents have been issued for methods embodied in this software: "Recognition and pose determination of 3D objects in 3D scenes using geometric point pair descriptors and the generalized Hough Transform", Bertram Heinrich Drost, Markus Ulrich, EP Patent 2385483 (Nov. 21, 2012), assignee: MVTec Software GmbH, 81675 Muenchen (Germany); "Recognition and pose determination of 3D objects in 3D
scenes", Bertram Heinrich Drost, Markus Ulrich, US Patent 8830229 (Sept. 9, 2014), assignee: MVTec Software GmbH, 81675 Muenchen (Germany). Further patents are pending. For further details, contact MVTec Software GmbH (<a href="#" onclick="location.href='mai'+'lto:'+'inf'+'o@'+'mvt'+'ec'+'.co'+'m'; return false;">info@<span style="display: none;">.nosp@m.</span>mvte<span style="display: none;">.nosp@m.</span>c.com</a>).</p>
<p>Note that restrictions imposed by these patents (and possibly others) exist independently of and may be in conflict with the freedoms granted in this license, which refers to copyright of the program, not patents for any methods that it implements. Both copyright and patent law must be obeyed to legally use and redistribute this program and it is not the purpose of this license to induce you to infringe any patents or other property right claims or to contest validity of any such claims. If you redistribute or use the program, then this license merely protects you from committing copyright infringement. It does not protect you from committing patent infringement. So, before you do anything with this program, make sure that you have permission to do so not merely in terms of copyright, but also in terms of patent law.</p>
<p>Please note that this license is not to be understood as a guarantee either. If you use the program according to this license, but in conflict with patent law, it does not mean that the licensor will refund you for any losses that you incur if you are sued for your patent infringement.</p>
<h2>Introduction to Surface Matching </h2>
<p>Cameras and similar devices with the capability of sensation of 3D structure are becoming more common. Thus, using depth and intensity information for matching 3D objects (or parts) are of crucial importance for computer vision. Applications range from industrial control to guiding everyday actions for visually impaired people. The task in recognition and pose estimation in range images aims to identify and localize a queried 3D free-form object by matching it to the acquired database.</p>
<p>From an industrial perspective, enabling robots to automatically locate and pick up randomly placed and oriented objects from a bin is an important challenge in factory automation, replacing tedious and heavy manual labor. A system should be able to recognize and locate objects with a predefined shape and estimate the position with the precision necessary for a gripping robot to pick it up. This is where vision guided robotics takes the stage. Similar tools are also capable of guiding robots (and even people) through unstructured environments, leading to automated navigation. These properties make 3D matching from point clouds a ubiquitous necessity. Within this context, I will now describe the OpenCV implementation of a 3D object recognition and pose estimation algorithm using 3D features.</p>
<h2>Surface Matching <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a> Through 3D Features </h2>
<p>The state of the algorithms in order to achieve the task 3D matching is heavily based on <a class="el" href="../../d0/de3/citelist.html#CITEREF_drost2010">[59]</a>, which is one of the first and main practical methods presented in this area. The approach is composed of extracting 3D feature points randomly from depth images or generic point clouds, indexing them and later in runtime querying them efficiently. Only the 3D structure is considered, and a trivial hash table is used for feature queries.</p>
<p>While being fully aware that utilization of the nice CAD model structure in order to achieve a smart point sampling, I will be leaving that aside now in order to respect the generalizability of the methods (Typically for such algorithms training on a CAD model is not needed, and a point cloud would be sufficient). Below is the outline of the entire algorithm:</p>
<div class="image">
<img alt="outline.jpg" src="../../outline.jpg"/>
<div class="caption">
Outline of the Algorithm</div></div>
<p> As explained, the algorithm relies on the extraction and indexing of point pair features, which are defined as follows:</p>
<p class="formulaDsp">
\[\bf{{F}}(\bf{{m1}}, \bf{{m2}}) = (||\bf{{d}}||_2, &lt;(\bf{{n1}},\bf{{d}}), &lt;(\bf{{n2}},\bf{{d}}), &lt;(\bf{{n1}},\bf{{n2}}))\]
</p>
<p>where \(\bf{{m1}}\) and \(\bf{{m2}}\) are feature two selected points on the model (or scene), \(\bf{{d}}\) is the difference vector, \(\bf{{n1}}\) and \(\bf{{n2}}\) are the normals at \(\bf{{m1}}\) and \(\bf{m2}\). During the training stage, this vector is quantized, indexed. In the test stage, same features are extracted from the scene and compared to the database. With a few tricks like separation of the rotational components, the pose estimation part can also be made efficient (check the reference for more details). A Hough-like voting and clustering is employed to estimate the object pose. To cluster the poses, the raw pose hypotheses are sorted in decreasing order of the number of votes. From the highest vote, a new cluster is created. If the next pose hypothesis is close to one of the existing clusters, the hypothesis is added to the cluster and the cluster center is updated as the average of the pose hypotheses within the cluster. If the next hypothesis is not close to any of the clusters, it creates a new cluster. The proximity testing is done with fixed thresholds in translation and rotation. Distance computation and averaging for translation are performed in the 3D Euclidean space, while those for rotation are performed using quaternion representation. After clustering, the clusters are sorted in decreasing order of the total number of votes which determines confidence of the estimated poses.</p>
<p>This pose is further refined using \(ICP\) in order to obtain the final pose.</p>
<p>PPF presented above depends largely on robust computation of angles between 3D vectors. Even though not reported in the paper, the naive way of doing this ( \(\theta = cos^{-1}({\bf{a}}\cdot{\bf{b}})\) remains numerically unstable. A better way to do this is then use inverse tangents, like:</p>
<p class="formulaDsp">
\[&lt;(\bf{n1},\bf{n2})=tan^{-1}(||{\bf{n1} \wedge \bf{n2}}||_2, \bf{n1} \cdot \bf{n2})\]
</p>
<h2>Rough Computation of Object Pose Given PPF </h2>
<p>Let me summarize the following notation:</p>
<ul>
<li>\(p^i_m\): \(i^{th}\) point of the model ( \(p^j_m\) accordingly)</li>
<li>\(n^i_m\): Normal of the \(i^{th}\) point of the model ( \(n^j_m\) accordingly)</li>
<li>\(p^i_s\): \(i^{th}\) point of the scene ( \(p^j_s\) accordingly)</li>
<li>\(n^i_s\): Normal of the \(i^{th}\) point of the scene ( \(n^j_s\) accordingly)</li>
<li>\(T_{m\rightarrow g}\): The transformation required to translate \(p^i_m\) to the origin and rotate its normal \(n^i_m\) onto the \(x\)-axis.</li>
<li>\(R_{m\rightarrow g}\): Rotational component of \(T_{m\rightarrow g}\).</li>
<li>\(t_{m\rightarrow g}\): Translational component of \(T_{m\rightarrow g}\).</li>
<li>\((p^i_m)^{'}\): \(i^{th}\) point of the model transformed by \(T_{m\rightarrow g}\). ( \((p^j_m)^{'}\) accordingly).</li>
<li>\({\bf{R_{m\rightarrow g}}}\): Axis angle representation of rotation \(R_{m\rightarrow g}\).</li>
<li>\(\theta_{m\rightarrow g}\): The angular component of the axis angle representation \({\bf{R_{m\rightarrow g}}}\).</li>
</ul>
<p>The transformation in a point pair feature is computed by first finding the transformation \(T_{m\rightarrow g}\) from the first point, and applying the same transformation to the second one. Transforming each point, together with the normal, to the ground plane leaves us with an angle to find out, during a comparison with a new point pair.</p>
<p>We could now simply start writing</p>
<p class="formulaDsp">
\[(p^i_m)^{'} = T_{m\rightarrow g} p^i_m\]
</p>
<p>where</p>
<p class="formulaDsp">
\[T_{m\rightarrow g} = -t_{m\rightarrow g}R_{m\rightarrow g}\]
</p>
<p>Note that this is nothing but a stacked transformation. The translational component \(t_{m\rightarrow g}\) reads</p>
<p class="formulaDsp">
\[t_{m\rightarrow g} = -R_{m\rightarrow g}p^i_m\]
</p>
<p>and the rotational being</p>
<p class="formulaDsp">
\[\theta_{m\rightarrow g} = \cos^{-1}(n^i_m \cdot {\bf{x}})\\ {\bf{R_{m\rightarrow g}}} = n^i_m \wedge {\bf{x}}\]
</p>
<p>in axis angle format. Note that bold refers to the vector form. After this transformation, the feature vectors of the model are registered onto the ground plane X and the angle with respect to \(x=0\) is called \(\alpha_m\). Similarly, for the scene, it is called \(\alpha_s\).</p>
<h3>Hough-like Voting Scheme</h3>
<p>As shown in the outline, PPF (point pair features) are extracted from the model, quantized, stored in the hashtable and indexed, during the training stage. During the runtime however, the similar operation is perfomed on the input scene with the exception that this time a similarity lookup over the hashtable is performed, instead of an insertion. This lookup also allows us to compute a transformation to the ground plane for the scene pairs. After this point, computing the rotational component of the pose reduces to computation of the difference \(\alpha=\alpha_m-\alpha_s\). This component carries the cue about the object pose. A Hough-like voting scheme is performed over the local model coordinate vector and \(\alpha\). The highest poses achieved for every scene point lets us recover the object pose.</p>
<h3>Source Code for PPF Matching</h3>
<div class="fragment"><div class="line"><span class="comment">// pc is the loaded point cloud of the model</span></div><div class="line"><span class="comment">// (Nx6) and pcTest is a loaded point cloud of</span></div><div class="line"><span class="comment">// the scene (Mx6)</span></div><div class="line">ppf_match_3d::PPF3DDetector detector(0.03, 0.05);</div><div class="line">detector.trainModel(<a class="code" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>);</div><div class="line">vector&lt;Pose3DPtr&gt; results;</div><div class="line">detector.match(pcTest, results, 1.0/10.0, 0.05);</div><div class="line">cout &lt;&lt; <span class="stringliteral">"Poses: "</span> &lt;&lt; endl;</div><div class="line"><span class="comment">// print the poses</span></div><div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;results.size(); i++)</div><div class="line">{</div><div class="line">    <a class="code" href="../../d9/d25/group__surface__matching.html#gaace349a5dbee5aa24dd68d8f57518902">Pose3DPtr</a> pose = results[i];</div><div class="line">    cout &lt;&lt; <span class="stringliteral">"Pose Result "</span> &lt;&lt; i &lt;&lt; endl;</div><div class="line">    pose-&gt;printPose();</div><div class="line">}</div></div><!-- fragment --><h2>Pose Registration via <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> </h2>
<p>The matching process terminates with the attainment of the pose. However, due to the multiple matching points, erroneous hypothesis, pose averaging and etc. such pose is very open to noise and many times is far from being perfect. Although the visual results obtained in that stage are pleasing, the quantitative evaluation shows \(~10\) degrees variation (error), which is an acceptable level of matching. Many times, the requirement might be set well beyond this margin and it is desired to refine the computed pose.</p>
<p>Furthermore, in typical RGBD scenes and point clouds, 3D structure can capture only less than half of the model due to the visibility in the scene. Therefore, a robust pose refinement algorithm, which can register occluded and partially visible shapes quickly and correctly is not an unrealistic wish.</p>
<p>At this point, a trivial option would be to use the well known iterative closest point algorithm . However, utilization of the basic <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> leads to slow convergence, bad registration, outlier sensitivity and failure to register partial shapes. Thus, it is definitely not suited to the problem. For this reason, many variants have been proposed . Different variants contribute to different stages of the pose estimation process.</p>
<p><a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> is composed of \(6\) stages and the improvements I propose for each stage is summarized below.</p>
<h3>Sampling</h3>
<p>To improve convergence speed and computation time, it is common to use less points than the model actually has. However, sampling the correct points to register is an issue in itself. The naive way would be to sample uniformly and hope to get a reasonable subset. More smarter ways try to identify the critical points, which are found to highly contribute to the registration process. Gelfand et. al. exploit the covariance matrix in order to constrain the eigenspace, so that a set of points which affect both translation and rotation are used. This is a clever way of subsampling, which I will optionally be using in the implementation.</p>
<h3>Correspondence Search</h3>
<p>As the name implies, this step is actually the assignment of the points in the data and the model in a closest point fashion. Correct assignments will lead to a correct pose, where wrong assignments strongly degrade the result. In general, KD-trees are used in the search of nearest neighbors, to increase the speed. However this is not an optimality guarantee and many times causes wrong points to be matched. Luckily the assignments are corrected over iterations.</p>
<p>To overcome some of the limitations, Picky <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> <a class="el" href="../../d0/de3/citelist.html#CITEREF_pickyicp">[296]</a> and BC-ICP (<a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> using bi-unique correspondences) are two well-known methods. Picky <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> first finds the correspondences in the old-fashioned way and then among the resulting corresponding pairs, if more than one scene point \(p_i\) is assigned to the same model point \(m_j\), it selects \(p_i\) that corresponds to the minimum distance. BC-ICP on the other hand, allows multiple correspondences first and then resolves the assignments by establishing bi-unique correspondences. It also defines a novel no-correspondence outlier, which intrinsically eases the process of identifying outliers.</p>
<p>For reference, both methods are used. Because P-ICP is a bit faster, with not-so-significant performance drawback, it will be the method of choice in refinment of correspondences.</p>
<h3>Weighting of Pairs</h3>
<p>In my implementation, I currently do not use a weighting scheme. But the common approaches involve normal compatibility* ( \(w_i=n^1_i\cdot n^2_j\)) or assigning lower weights to point pairs with greater distances ( \(w=1-\frac{||dist(m_i,s_i)||_2}{dist_{max}}\)).</p>
<h3>Rejection of Pairs</h3>
<p>The rejections are done using a dynamic thresholding based on a robust estimate of the standard deviation. In other words, in each iteration, I find the MAD estimate of the Std. Dev. I denote this as \(mad_i\). I reject the pairs with distances \(d_i&gt;\tau mad_i\). Here \(\tau\) is the threshold of rejection and by default set to \(3\). The weighting is applied prior to Picky refinement, explained in the previous stage.</p>
<h3><a class="el" href="../../d1/d0d/namespacecv_1_1Error.html">Error</a> Metric</h3>
<p>As described in , a linearization of point to plane as in <a class="el" href="../../d0/de3/citelist.html#CITEREF_koklimlow">[153]</a> error metric is used. This both speeds up the registration process and improves convergence.</p>
<h3>Minimization</h3>
<p>Even though many non-linear optimizers (such as Levenberg Mardquardt) are proposed, due to the linearization in the previous step, pose estimation reduces to solving a linear system of equations. This is what I do exactly using <a class="el" href="../../d2/de8/group__core__array.html#ga12b43690dbd31fed96f213eefead2373" title="Solves one or more linear systems or least-squares problems. ">cv::solve</a> with DECOMP_SVD option.</p>
<h3><a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a></h3>
<p>Having described the steps above, here I summarize the layout of the <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> algorithm.</p>
<h4>Efficient <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> Through Point Cloud Pyramids</h4>
<p>While the up-to-now-proposed variants deal well with some outliers and bad initializations, they require significant number of iterations. Yet, multi-resolution scheme can help reducing the number of iterations by allowing the registration to start from a coarse level and propagate to the lower and finer levels. Such approach both improves the performances and enhances the runtime.</p>
<p>The search is done through multiple levels, in a hierarchical fashion. The registration starts with a very coarse set of samples of the model. Iteratively, the points are densified and sought. After each iteration the previously estimated pose is used as an initial pose and refined with the <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a>.</p>
<h4>Visual Results</h4>
<h5>Results on Synthetic Data</h5>
<p>In all of the results, the pose is initiated by PPF and the rest is left as: \([\theta_x, \theta_y, \theta_z, t_x, t_y, t_z]=[0]\)</p>
<h3>Source Code for Pose Refinement Using <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a></h3>
<div class="fragment"><div class="line">ICP icp(200, 0.001f, 2.5f, 8);</div><div class="line"><span class="comment">// Using the previously declared pc and pcTest</span></div><div class="line"><span class="comment">// This will perform registration for every pose</span></div><div class="line"><span class="comment">// contained in results</span></div><div class="line">icp.registerModelToScene(<a class="code" href="../../d2/d75/namespacecv.html#a172ccaaba996db5201af1c17c04a5fe8a5c598dc317cfe6ac99afeaeed18454c7">pc</a>, pcTest, results);</div><div class="line"></div><div class="line"><span class="comment">// results now contain the refined poses</span></div></div><!-- fragment --><h2>Results </h2>
<p>This section is dedicated to the results of surface matching (point-pair-feature matching and a following <a class="el" href="../../dc/d9b/classcv_1_1ppf__match__3d_1_1ICP.html" title="This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...">ICP</a> refinement):</p>
<div class="image">
<img alt="gsoc_forg_matches.jpg" src="../../gsoc_forg_matches.jpg"/>
<div class="caption">
Several matches of a single frog model using ppf + icp</div></div>
<p> Matches of different models for Mian dataset is presented below:</p>
<div class="image">
<img alt="snapshot27.jpg" src="../../snapshot27.jpg"/>
<div class="caption">
Matches of different models for Mian dataset</div></div>
<p> You might checkout the video on <a href="http://www.youtube.com/watch?v=uFnqLFznuZU">youTube here</a>.</p>
<h2>A Complete Sample </h2>
<h3>Parameter Tuning</h3>
<p>Surface matching module treats its parameters relative to the model diameter (diameter of the axis parallel bounding box), whenever it can. This makes the parameters independent from the model size. This is why, both model and scene cloud were subsampled such that all points have a minimum distance of \(RelativeSamplingStep*DimensionRange\), where \(DimensionRange\) is the distance along a given dimension. All three dimensions are sampled in similar manner. For example, if \(RelativeSamplingStep\) is set to 0.05 and the diameter of model is 1m (1000mm), the points sampled from the object's surface will be approximately 50 mm apart. From another point of view, if the sampling RelativeSamplingStep is set to 0.05, at most \(20x20x20 = 8000\) model points are generated (depending on how the model fills in the volume). Consequently this results in at most 8000x8000 pairs. In practice, because the models are not uniformly distributed over a rectangular prism, much less points are to be expected. Decreasing this value, results in more model points and thus a more accurate representation. However, note that number of point pair features to be computed is now quadratically increased as the complexity is O(N\^2). This is especially a concern for 32 bit systems, where large models can easily overshoot the available memory. Typically, values in the range of 0.025 - 0.05 seem adequate for most of the applications, where the default value is 0.03. (Note that there is a difference in this paremeter with the one presented in <a class="el" href="../../d0/de3/citelist.html#CITEREF_drost2010">[59]</a> . In <a class="el" href="../../d0/de3/citelist.html#CITEREF_drost2010">[59]</a> a uniform cuboid is used for quantization and model diameter is used for reference of sampling. In my implementation, the cuboid is a rectangular prism, and each dimension is quantized independently. I do not take reference from the diameter but along the individual dimensions.</p>
<p>It would very wise to remove the outliers from the model and prepare an ideal model initially. This is because, the outliers directly affect the relative computations and degrade the matching accuracy.</p>
<p>During runtime stage, the scene is again sampled by \(RelativeSamplingStep\), as described above. However this time, only a portion of the scene points are used as reference. This portion is controlled by the parameter \(RelativeSceneSampleStep\), where \(SceneSampleStep = (int)(1.0/RelativeSceneSampleStep)\). In other words, if the \(RelativeSceneSampleStep = 1.0/5.0\), the subsampled scene will once again be uniformly sampled to 1/5 of the number of points. Maximum value of this parameter is 1 and increasing this parameter also increases the stability, but decreases the speed. Again, because of the initial scene-independent relative sampling, fine tuning this parameter is not a big concern. This would only be an issue when the model shape occupies a volume uniformly, or when the model shape is condensed in a tiny place within the quantization volume (e.g. The octree representation would have too much empty cells).</p>
<p>\(RelativeDistanceStep\) acts as a step of discretization over the hash table. The point pair features are quantized to be mapped to the buckets of the hashtable. This discretization involves a multiplication and a casting to the integer. Adjusting RelativeDistanceStep in theory controls the collision rate. Note that, more collisions on the hashtable results in less accurate estimations. Reducing this parameter increases the affect of quantization but starts to assign non-similar point pairs to the same bins. Increasing it however, wanes the ability to group the similar pairs. Generally, because during the sampling stage, the training model points are selected uniformly with a distance controlled by RelativeSamplingStep, RelativeDistanceStep is expected to equate to this value. Yet again, values in the range of 0.025-0.05 are sensible. This time however, when the model is dense, it is not advised to decrease this value. For noisy scenes, the value can be increased to improve the robustness of the matching against noisy points. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga209242181c847535105212d7b01d4d82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga209242181c847535105212d7b01d4d82">◆ </a></span>KeyType</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a> <a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">cv::ppf_match_3d::KeyType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaace349a5dbee5aa24dd68d8f57518902"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaace349a5dbee5aa24dd68d8f57518902">◆ </a></span>Pose3DPtr</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d5/d22/classcv_1_1ppf__match__3d_1_1Pose3D.html">Pose3D</a>&gt; <a class="el" href="../../d9/d25/group__surface__matching.html#gaace349a5dbee5aa24dd68d8f57518902">cv::ppf_match_3d::Pose3DPtr</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d8/d9d/pose__3d_8hpp.html">opencv2/surface_matching/pose_3d.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga89a4263e9791e1a3c81f4403cd0ad5a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga89a4263e9791e1a3c81f4403cd0ad5a3">◆ </a></span>PoseCluster3DPtr</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d2/d4b/classcv_1_1ppf__match__3d_1_1PoseCluster3D.html">PoseCluster3D</a>&gt; <a class="el" href="../../d9/d25/group__surface__matching.html#ga89a4263e9791e1a3c81f4403cd0ad5a3">cv::ppf_match_3d::PoseCluster3DPtr</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d8/d9d/pose__3d_8hpp.html">opencv2/surface_matching/pose_3d.hpp</a>&gt;</code></p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7ba92c6b7cb6cc7565c2c038ddc88bbb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7ba92c6b7cb6cc7565c2c038ddc88bbb">◆ </a></span>addNoisePC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::addNoisePC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scale</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ppf_match_3d.addNoisePC(</td><td class="paramname">pc, scale</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Adds a uniform noise in the given scale to the input point cloud </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pc</td><td>Input point cloud (CV_32F family). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Input scale of the noise. The larger the scale, the more noisy the output </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gaba913ce390921fb9cb212de4198665a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaba913ce390921fb9cb212de4198665a2">◆ </a></span>computeBboxStd()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::computeBboxStd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp; </td>
          <td class="paramname"><em>xRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp; </td>
          <td class="paramname"><em>yRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp; </td>
          <td class="paramname"><em>zRange</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaa74e62c7b2a8b8a70e44e42211fd00f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa74e62c7b2a8b8a70e44e42211fd00f5">◆ </a></span>computeNormalsPC3d()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::ppf_match_3d::computeNormalsPC3d </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>PCNormals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int </td>
          <td class="paramname"><em>NumNeighbors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool </td>
          <td class="paramname"><em>FlipViewpoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#gab9e0ab642a3e01742916763173b72232">Vec3f</a> &amp; </td>
          <td class="paramname"><em>viewpoint</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, PCNormals</td><td>=</td><td>cv.ppf_match_3d.computeNormalsPC3d(</td><td class="paramname">PC, NumNeighbors, FlipViewpoint, viewpoint[, PCNormals]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Compute the normals of an arbitrary point cloud computeNormalsPC3d uses a plane fitting approach to smoothly compute local normals. Normals are obtained through the eigenvector of the covariance matrix, corresponding to the smallest eigen value. If PCNormals is provided to be an Nx6 matrix, then no new allocation is made, instead the existing memory is overwritten. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">PC</td><td>Input point cloud to compute the normals for. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">PCNormals</td><td>Output point cloud </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">NumNeighbors</td><td>Number of neighbors to take into account in a local region </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">FlipViewpoint</td><td>Should normals be flipped to a viewing direction? </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">viewpoint</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns 0 on success </dd></dl>
</div>
</div>
<a id="ga439450ce38dae0b87bf497c50d6211e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga439450ce38dae0b87bf497c50d6211e9">◆ </a></span>destroyFlann()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::destroyFlann </td>
          <td>(</td>
          <td class="paramtype">void * </td>
          <td class="paramname"><em>flannIndex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga4ef8ad47fa5a52443c05cd0fafba11cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4ef8ad47fa5a52443c05cd0fafba11cc">◆ </a></span>getRandomPose()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::getRandomPose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga366070cdc95233a6b6db521dfd99e713">Matx44d</a> &amp; </td>
          <td class="paramname"><em>Pose</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ppf_match_3d.getRandomPose(</td><td class="paramname">Pose</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Generate a random 4x4 pose matrix </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">Pose</td><td>The random pose </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga90a4c50416db18acf94dbd1ea093f2f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga90a4c50416db18acf94dbd1ea093f2f5">◆ </a></span>hashtable_int_clone()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a>* cv::ppf_match_3d::hashtable_int_clone </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga015840b9f9314f64af7ccd29d6a866d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga015840b9f9314f64af7ccd29d6a866d3">◆ </a></span>hashtableCreate()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a>* cv::ppf_match_3d::hashtableCreate </td>
          <td>(</td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t(*)(<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a>) </td>
          <td class="paramname"><em>hashfunc</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaf6dab57e6f2f511e029e198946084034"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf6dab57e6f2f511e029e198946084034">◆ </a></span>hashtableDestroy()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::hashtableDestroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gad71d713e1d0473252d348a830c7d49b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad71d713e1d0473252d348a830c7d49b8">◆ </a></span>hashtableGet()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* cv::ppf_match_3d::hashtableGet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> </td>
          <td class="paramname"><em>key</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaa6bde312719e4169913498e486b94563"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa6bde312719e4169913498e486b94563">◆ </a></span>hashtableGetBucketHashed()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d48/structhashnode__i.html">hashnode_i</a>* cv::ppf_match_3d::hashtableGetBucketHashed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> </td>
          <td class="paramname"><em>key</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaec303fafd34abac1f8484e770873baab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaec303fafd34abac1f8484e770873baab">◆ </a></span>hashtableInsert()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::ppf_match_3d::hashtableInsert </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> </td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void * </td>
          <td class="paramname"><em>data</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gae8d440f96050e4c9281cf31f44e3664c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae8d440f96050e4c9281cf31f44e3664c">◆ </a></span>hashtableInsertHashed()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::ppf_match_3d::hashtableInsertHashed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> </td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void * </td>
          <td class="paramname"><em>data</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga0a19bdd2a6084b1e36ffa5c08a8b6dbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0a19bdd2a6084b1e36ffa5c08a8b6dbe">◆ </a></span>hashtablePrint()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::hashtablePrint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaaefc1e53458a2f84f73244b1450489d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaaefc1e53458a2f84f73244b1450489d7">◆ </a></span>hashtableRead()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a>* cv::ppf_match_3d::hashtableRead </td>
          <td>(</td>
          <td class="paramtype">FILE * </td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaebe839b16913e028b8eb8a9ff6288130"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaebe839b16913e028b8eb8a9ff6288130">◆ </a></span>hashtableRemove()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::ppf_match_3d::hashtableRemove </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d25/group__surface__matching.html#ga209242181c847535105212d7b01d4d82">KeyType</a> </td>
          <td class="paramname"><em>key</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gacf7a8a048ffc1c1db34732c64c6a47b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacf7a8a048ffc1c1db34732c64c6a47b2">◆ </a></span>hashtableResize()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::ppf_match_3d::hashtableResize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>size</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga7ee817b1612534a975e518877efbd956"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7ee817b1612534a975e518877efbd956">◆ </a></span>hashtableWrite()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::ppf_match_3d::hashtableWrite </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d9/d8b/structhashtable__int.html">hashtable_int</a> * </td>
          <td class="paramname"><em>hashtbl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t </td>
          <td class="paramname"><em>dataSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE * </td>
          <td class="paramname"><em>f</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gadca01b67adab0bbbdd5b2507f63c7f21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadca01b67adab0bbbdd5b2507f63c7f21">◆ </a></span>indexPCFlann()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* cv::ppf_match_3d::indexPCFlann </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gad893719cc47a72b24482f2bfdebb409e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad893719cc47a72b24482f2bfdebb409e">◆ </a></span>loadPLYSimple()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::loadPLYSimple </td>
          <td>(</td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>withNormals</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ppf_match_3d.loadPLYSimple(</td><td class="paramname">fileName[, withNormals]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Load a PLY file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fileName</td><td>The PLY model to read </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">withNormals</td><td>Flag wheather the input PLY contains normal information, and whether it should be loaded or not </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns the matrix on successful load </dd></dl>
</div>
</div>
<a id="ga26d44267cee459ec1a861b24066e2d89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga26d44267cee459ec1a861b24066e2d89">◆ </a></span>next_power_of_two()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a> cv::ppf_match_3d::next_power_of_two </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4f5fce8c1ef282264f9214809524d836">uint</a> </td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d43/t__hash__int_8hpp.html">opencv2/surface_matching/t_hash_int.hpp</a>&gt;</code></p>
<p>Round up to the next highest power of 2. </p>
<p>from <a href="http://www-graphics.stanford.edu/~seander/bithacks.html">http://www-graphics.stanford.edu/~seander/bithacks.html</a> </p>
</div>
</div>
<a id="gaae4792bf8469222356c16364759941aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaae4792bf8469222356c16364759941aa">◆ </a></span>normalizePCCoeff()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::normalizePCCoeff </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float * </td>
          <td class="paramname"><em>Cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float * </td>
          <td class="paramname"><em>Cy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float * </td>
          <td class="paramname"><em>Cz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float * </td>
          <td class="paramname"><em>MinVal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float * </td>
          <td class="paramname"><em>MaxVal</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga1f97667a487faab9bd849341361db1a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1f97667a487faab9bd849341361db1a1">◆ </a></span>queryPCFlann() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::queryPCFlann </td>
          <td>(</td>
          <td class="paramtype">void * </td>
          <td class="paramname"><em>flannIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>distances</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gac98a74b02d163b63ec68e8bf6ebcf8c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac98a74b02d163b63ec68e8bf6ebcf8c6">◆ </a></span>queryPCFlann() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::queryPCFlann </td>
          <td>(</td>
          <td class="paramtype">void * </td>
          <td class="paramname"><em>flannIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>distances</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int </td>
          <td class="paramname"><em>numNeighbors</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga685d0fc50635dfdd4ebc587067ff44a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga685d0fc50635dfdd4ebc587067ff44a9">◆ </a></span>samplePCByQuantization()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::samplePCByQuantization </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp; </td>
          <td class="paramname"><em>xrange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp; </td>
          <td class="paramname"><em>yrange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga392bb4f8a6b9e0dde07f31dc28e73319">Vec2f</a> &amp; </td>
          <td class="paramname"><em>zrange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>sample_step_relative</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>weightByCenter</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ppf_match_3d.samplePCByQuantization(</td><td class="paramname">pc, xrange, yrange, zrange, sample_step_relative[, weightByCenter]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Sample a point cloud using uniform steps </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pc</td><td>Input point cloud </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">xrange</td><td>X components (min and max) of the bounding box of the model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">yrange</td><td>Y components (min and max) of the bounding box of the model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">zrange</td><td>Z components (min and max) of the bounding box of the model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sample_step_relative</td><td>The point cloud is sampled such that all points have a certain minimum distance. This minimum distance is determined relatively using the parameter sample_step_relative. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">weightByCenter</td><td>The contribution of the quantized data points can be weighted by the distance to the origin. This parameter enables/disables the use of weighting. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sampled point cloud </dd></dl>
</div>
</div>
<a id="gafa74163329034224819de46933541e9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa74163329034224819de46933541e9c">◆ </a></span>samplePCUniform()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::samplePCUniform </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>sampleStep</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga5d137ea853b0263108fc324cff4656f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5d137ea853b0263108fc324cff4656f3">◆ </a></span>samplePCUniformInd()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::samplePCUniformInd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>sampleStep</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>indices</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gab21c92ff881ae85b72c552e7e6e52c55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab21c92ff881ae85b72c552e7e6e52c55">◆ </a></span>transformPCPose()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::transformPCPose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga366070cdc95233a6b6db521dfd99e713">Matx44d</a> &amp; </td>
          <td class="paramname"><em>Pose</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ppf_match_3d.transformPCPose(</td><td class="paramname">pc, Pose</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Transforms the point cloud with a given a homogeneous 4x4 pose matrix (in double precision) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pc</td><td>Input point cloud (CV_32F family). Point clouds with 3 or 6 elements per row are expected. In the case where the normals are provided, they are also rotated to be compatible with the entire transformation </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">Pose</td><td>4x4 pose matrix, but linearized in row-major form. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Transformed point cloud </dd></dl>
</div>
</div>
<a id="gab6d5a91876b73a024830da8405909b79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab6d5a91876b73a024830da8405909b79">◆ </a></span>transPCCoeff()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ppf_match_3d::transPCCoeff </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>pc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>scale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>Cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>Cy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>Cz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>MinVal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>MaxVal</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga72ffa4c73f214a573cb4028e015c4adb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga72ffa4c73f214a573cb4028e015c4adb">◆ </a></span>writePLY()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::writePLY </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>fileName</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ppf_match_3d.writePLY(</td><td class="paramname">PC, fileName</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Write a point cloud to PLY file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">PC</td><td>Input point cloud </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fileName</td><td>The PLY model file to write </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga965333522cfe06814478dec8ffa4cd41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga965333522cfe06814478dec8ffa4cd41">◆ </a></span>writePLYVisibleNormals()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ppf_match_3d::writePLYVisibleNormals </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td>
          <td class="paramname"><em>PC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>fileName</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ppf_match_3d.writePLYVisibleNormals(</td><td class="paramname">PC, fileName</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d9/dd2/ppf__helpers_8hpp.html">opencv2/surface_matching/ppf_helpers.hpp</a>&gt;</code></p>
<p>Used for debbuging pruposes, writes a point cloud to a PLY file with the tip of the normal vectors as visible red points. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">PC</td><td>Input point cloud </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fileName</td><td>The PLY model file to write </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
